/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cpal.entrenamiento.dao.impl;

import com.cpal.entrenamiento.dao.ITerapeutaDAO;
import com.cpal.entrenamiento.entity.Terapeuta;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

/**
 *
 * @author onoel
 */
@Repository
public class TerapeutaDAO extends SqlMapClientDaoSupport implements ITerapeutaDAO{

    @Override
    public List<Terapeuta> buscarTerapeuta(Terapeuta terapeuta) throws DataAccessException {
        Map<String, Object> parameterMap = new HashMap<String, Object>();
        parameterMap.put("codigo", terapeuta.getCodigo());
        parameterMap.put("nombre", terapeuta.getNombre());
        parameterMap.put("especialidad", terapeuta.getEspecialidad());

        return getSqlMapClientTemplate().queryForList("buscarTerapeuta", parameterMap);
    }
    
}
